package com.jsnj33.pdaproject.ui;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.jsnj33.pdaproject.R;

public class TestActivity extends AppCompatActivity {

    public static void start(Context context, String address, String map) {
        Intent starter = new Intent(context, TestActivity.class);
        starter.putExtra("address", address);
        starter.putExtra("map", map);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        String map = getIntent().getStringExtra("map");
        String address = getIntent().getStringExtra("address");
        TextView textView = findViewById(R.id.tvInfo);
        TextView textView2 = findViewById(R.id.tvInfo2);
        textView.setText("" + address);
        textView2.setText("" + map);
    }
}
